/*
 * =====================================================================================
 *
 *       Filename:  rwlock.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  02/25/2011 02:47:13 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  dp (8023), dp8023@gmail.com
 *        Company:  
 *
 * =====================================================================================
 */

#ifndef _RW_LOCK_H_
#define _RW_LOCK_H_

#include <pthread.h>

class rwlock
{
	public:
		bool init();
		bool destroy();
		bool rdlock();
		bool wrlock();
		bool unlock();

	private:
		pthread_rwlock_t m_rwlock;
};

#endif
